load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
load("//bazel:kotlin.bzl", "ktlint")

kt_jvm_library(
    name = "instrumentor",
    srcs = [
        "ClassInstrumentor.kt",
        "CoverageRecorder.kt",
        "DescriptorUtils.kt",
        "DeterministicRandom.kt",
        "EdgeCoverageInstrumentor.kt",
        "Hook.kt",
        "HookInstrumentor.kt",
        "HookMethodVisitor.kt",
        "Hooks.kt",
        "Instrumentor.kt",
        "StaticMethodStrategy.java",
        "TraceDataFlowInstrumentor.kt",
    ],
    visibility = [
        "//src/jmh/java/com/code_intelligence/jazzer/instrumentor:__pkg__",
        "//src/main/java/com/code_intelligence/jazzer/agent:__pkg__",
        "//src/main/java/com/code_intelligence/jazzer/driver:__pkg__",
        "//src/test/java/com/code_intelligence/jazzer/instrumentor:__pkg__",
    ],
    deps = [
        "//src/main/java/com/code_intelligence/jazzer/api:hooks",
        "//src/main/java/com/code_intelligence/jazzer/runtime:jazzer_bootstrap_compile_only",
        "//src/main/java/com/code_intelligence/jazzer/utils",
        "//src/main/java/com/code_intelligence/jazzer/utils:class_name_globber",
        "//src/main/java/com/code_intelligence/jazzer/utils:log",
        "@com_github_classgraph_classgraph//:classgraph",
        "@com_github_jetbrains_kotlin//:kotlin-reflect",
        "@jazzer_jacoco//:jacoco_internal",
        "@org_ow2_asm_asm//jar",
        "@org_ow2_asm_asm_commons//jar",
        "@org_ow2_asm_asm_tree//jar",
    ],
)

ktlint()
